{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from skimage import io\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "num = 1\n",
    "\n",
    "\n",
    "def show():\n",
    "    global num\n",
    "\n",
    "\n",
    "    while (num < 5):\n",
    "        img = io.imread('/Users/meituan_sxw/PycharmProjects/tensorflow1.2/basic/pic/' + str(num) + '.jpeg')\n",
    "        io.imshow(img)\n",
    "        plt.ion()\n",
    "        plt.pause(0.01)\n",
    "        #input(\"Press Enter to Continue\")  # 之后改成识别输出\n",
    "        num += 1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "JPEG (200, 110) RGB\n",
      "JPEG (200, 150) RGB\n",
      "JPEG (200, 150) RGB\n",
      "JPEG (200, 112) RGB\n",
      "JPEG (200, 112) RGB\n",
      "JPEG (200, 133) RGB\n",
      "JPEG (200, 132) RGB\n",
      "JPEG (200, 120) RGB\n",
      "JPEG (187, 150) RGB\n",
      "JPEG (200, 122) RGB\n",
      "JPEG (200, 133) RGB\n",
      "JPEG (200, 120) RGB\n",
      "JPEG (200, 124) RGB\n",
      "JPEG (200, 150) RGB\n",
      "JPEG (200, 124) RGB\n",
      "JPEG (200, 150) RGB\n",
      "JPEG (200, 141) RGB\n",
      "JPEG (200, 132) RGB\n",
      "JPEG (200, 113) RGB\n",
      "JPEG (200, 112) RGB\n",
      "JPEG (200, 110) RGB\n",
      "JPEG (200, 150) RGB\n",
      "JPEG (200, 124) RGB\n",
      "JPEG (200, 120) RGB\n",
      "JPEG (187, 150) RGB\n",
      "JPEG (187, 150) RGB\n",
      "JPEG (200, 124) RGB\n",
      "JPEG (200, 130) RGB\n",
      "JPEG (200, 112) RGB\n",
      "JPEG (200, 150) RGB\n",
      "JPEG (200, 124) RGB\n",
      "JPEG (200, 134) RGB\n",
      "JPEG (200, 144) RGB\n",
      "JPEG (200, 112) RGB\n",
      "JPEG (200, 112) RGB\n",
      "JPEG (200, 112) RGB\n"
     ]
    }
   ],
   "source": [
    "show()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1\n",
      "2\n",
      "3\n",
      "4\n",
      "5\n",
      "6\n",
      "7\n",
      "8\n",
      "9\n",
      "10\n",
      "11\n",
      "12\n",
      "13\n",
      "14\n",
      "15\n",
      "16\n",
      "17\n",
      "18\n",
      "19\n",
      "20\n",
      "21\n",
      "22\n",
      "23\n",
      "24\n",
      "25\n",
      "26\n",
      "27\n",
      "28\n",
      "29\n",
      "30\n",
      "31\n",
      "32\n",
      "33\n",
      "34\n",
      "35\n",
      "36\n"
     ]
    }
   ],
   "source": [
    "\n",
    "import matplotlib.pyplot as plt\n",
    "import imageio,os\n",
    "\n",
    "\n",
    "name_list = ['shumabaobei','siquxiongdi','shenqibaobei','shengdoushi','weiqishaonian','lanmaotaoqi',\n",
    "            'guangnengshizhe','qilongzhu','duolaameng','labixiaoxin','youxiwang','wangqiuwangzi']\n",
    "\n",
    "for i in range(12):\n",
    "    num = i * 3 + 1\n",
    "    maxnum = num + 2\n",
    "    images = []\n",
    "    while (num <= maxnum):\n",
    "        print(num)\n",
    "        images.append(imageio.imread('/Users/meituan_sxw/PycharmProjects/tensorflow1.2/basic/pic/' + str(num) + '.jpeg'))\n",
    "        num += 1\n",
    "    imageio.mimsave(name_list[i] + '.gif', images,duration=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "python35",
   "language": "python",
   "name": "python35"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
